<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
    <head>
        <%@include file="../common/head.jspf" %>
    </head>

    <body class="loan-document-page gallery-page sb-l-o sb-r-c sb-l-o" data-menu="#menu_loan" data-list="#li_loan_list">

        <!-- 主体内容开始 -->
        <div id="main">

            <!--侧边导航栏-->
            <%@include file="../common/sidebar.jspf" %>

            <!-- Start: Content-Wrapper -->
            <section id="content_wrapper">

                <!-- 顶部导航 -->
                <header id="topbar">
                    <div class="topbar-left">
                        <ol class="breadcrumb">
                            <li class="crumb-active">
                                <span>软擎科技</span>
                            </li>
                            <li class="crumb-icon">
                                <a href="dashboard"><span class="glyphicon glyphicon-home"></span></a>
                            </li>
                            <!-- 当前页 -->
                            <li class="crumb-trail">标的认证材料</li>
                        </ol>
                    </div>
                    <div class="topbar-right">
                        <!-- 登录信息 -->
                        <%@include file="../common/session.jspf" %>
                    </div>
                </header>
                <!-- 顶部导航结束 -->

                <!-- 页面内容开始 -->
                <section id="content" class="pn">
                    <div id="loan" data-id="${model.id}" data-status="${model.status}" class="hidden"></div>
                    <!--标的认证材料-->
                    <div class="table-layout">
                        <div class="tray tray-center pn va-t">
                            <div class="mh15 pv15 br-b br-light">
                                <div class="row">
                                    <div class="col-xs-7">
                                        <%@include file="common/nav.jspf" %>
                                    </div>
                                    <div class="col-xs-5 text-right">
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-default to-grid">
                                                <span class="fa fa-file-image-o mr5"></span> 基本材料
                                            </button>
                                            <button type="button" class="btn btn-default to-list">
                                                <span class="fa fa-check-square-o mr5"></span> 可选材料
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div id="mix-container">
                                <div class="fs16 text-muted mt25 text-center" id="loading"><span class="fa fa-spin fa-spinner mr10"></span>加载中 ..</div>
                            </div>
                        </div>

                        <aside class="tray tray-right w320 va-t" data-tray-height="match">

                            <h4 class="ph10 mt10 mb15"> 上传认证材料 </h4>
                            <hr class="mn br-light">
                            <div class="fileupload fileupload-new admin-form mt20" data-provides="fileupload">
                                <div class="tray-bin mb10 cursor-pointer text-center pt20 text-muted-lighter" id="upZone">
                                    <i class="fa fa-folder-open-o mr10 fs20"></i>选择上传文件
                                </div>
                                <div class="section br-b" id="imagePreview"></div>
                                <div class="section mb10">
                                    <label for="fileName" class="field prepend-icon">
                                        <input type="text" name="fileName" id="fileName" class="event-name gui-input br-light light" placeholder="材料名称">
                                        <label for="fileName" class="field-icon"><i class="fa fa-tag"></i></label>
                                    </label>
                                </div>
                                <div class="section mb10">
                                    <label class="field prepend-icon">
                                        <textarea class="gui-textarea br-light h-80 bg-light" id="description" name="description" placeholder="材料说明"></textarea>
                                        <label for="comment" class="field-icon"><i class="fa fa-comments"></i></label>
                                        <span class="input-footer hidden">
                                            <strong>提示:</strong>只能上传图片、PDF、doc...</span>
                                    </label>
                                </div>
                                <button class="btn btn-primary btn-block" id="doUploadBtn"><i class="fa fa-check mr10"></i>保存材料</button>

                                <form action="" name="uploadForm" class="hidden" >
                                    <input type="file" id="fileInput"/> 
                                    <button class="btn btn-danger hidden" id="uploadBtn"><i class="icon-ok"></i> 上传</button>
                                </form>
                            </div>
                        </aside>
                    </div>
                </section>
                <!-- 页面内容结束 -->

            </section>
        </div>
        <!-- 主体内容结束 -->

        <script type="text/x-tmpl-mustache" id="imageTemplate">
            {{#result}}
            <div class="mix">
                <div class="panel p6 pbn">
                    <div class="of-h">
                        <div class="text-center bg-light dark">
                            <img src="{{url}}!s" data-url="{{url}}" class="h-170 doc_img" title="{{name}}">
                        </div>
                        <div class="mt10 text-center">
                            <h6 class="ellipsis"><code>{{name}}</code></h6>
                            <h6>上传日期：{{createTime}}</h6>
                            <h6>
                                <span class="visible-link mr10 cursor-pointer" data-id="{{id}}" data-visible="{{visible}}"><i class="fa fa fa-eye-slash {{vclass}}"></i> 前端可见</span>
                                <span class="delete-link cursor-pointer" data-id="{{id}}"><i class="fa fa fa-times text-danger"></i> 删除</span>
                            </h6>
                        </div>
                    </div>
                </div>
            </div>
            {{/result}}
        </script>
        <!-- 公共函数 -->
        <%@include file="../common/scripts.jspf" %>
        <script src="${rootPath}/js/pages/loan/documents.js" type="text/javascript"></script>
    </body>
</html>
